package com.hkbigdata.sybx.controller;

import com.hkbigdata.sybx.bean.Policy;
import com.hkbigdata.sybx.service.PolicyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author liuanbo
 * @creat 2025-06-03-15:25
 * @see 2194550857@qq.com
 */
@RestController
@RequestMapping("/api/policy")
public class PolicyController {
    @Autowired
    private PolicyService policyService;
    @GetMapping("/select")
    public List<Policy> listPolicy(){
        List<Policy> policies = policyService.listPolicy();
        return policies;
    }
}
